/**********************************************************************
 * Project : WoWGuildRoster (http://www.codeplex.com/WowGuildRoster/)
 * Module  : DotNetWarcraft.WoWGuildRoster.Business.DropDownVal
 **********************************************************************
 * 
 * 
 * 
 **********************************************************************
 * License : All code is subject to licensing terms per the Microsoft
 *   Permissive License (Ms-PL) v1.1. For full license information,
 *   refer to the packaged license.txt file.
 **********************************************************************
 * Revision History:
 * -----------------
 * 2007-09-02 -- Cliff Simpkins: Initial Version
 **********************************************************************
 */
using System;
using System.Data;

using DotNetWarcraft.Common;

namespace DotNetWarcraft.WoWGuildRoster.Business {
  /// <summary>
  /// Utility class to represent generic drop-down value pairs. For simplicity, 
  /// the pairs are both stored as strings and pull from the first two columns 
  /// of any passed data rows
  /// </summary>
  public class DropDownVal {
    #region Protected Members
    protected String _key;
    protected String _value;
    #endregion
    #region Public Properties
    public String Key {
      get {
        return _key;
      }
      set {
        _key = value;
      }
    }
    public String Value {
      get {
        return _value;
      }
      set {
        _value = value;
      }
    }
    #endregion
    #region Constructors
    public DropDownVal() {
      _key = "";
      _value = "";
    }

    public DropDownVal(DataRow rosterSrc) : this() {
      this._key = SqlDataUtils.RetrieveDbString(rosterSrc[0]);
      this._value = SqlDataUtils.RetrieveDbString(rosterSrc[1]);
    }

    #endregion

  }
}
